#include <AVUITransform.h>

namespace AVUI {

class TransformCollection;

/// <summary>Represents a composite <see cref="T:System.Windows.Media.Transform" /> composed of other <see cref="T:System.Windows.Media.Transform" /> objects. </summary>
class TransformGroup : public Transform
{
public:
    DECLARE_ELEMENT(TransformGroup, Transform);

#pragma region Public Methods

    /// <summary>Initializes a new instance of the <see cref="T:System.Windows.Media.TransformGroup" /> class.</summary>
    TransformGroup();

    /// <summary>Creates a modifiable copy of this <see cref="T:System.Windows.Media.TransformGroup" /> by making deep copies of its values.</summary>
    /// <returns>A modifiable deep copy of the current object. The <see cref="P:System.Windows.Freezable.IsFrozen" /> property of the cloned object returns false even if the <see cref="P:System.Windows.Freezable.IsFrozen" /> property of the source is true.</returns>
    TRefCountedPtr<TransformGroup> Clone() { return (TransformGroup*) Transform::Clone().get_Ptr(); }

    /// <summary>Creates a modifiable copy of this <see cref="T:System.Windows.Media.TransformGroup" /> object by making deep copies of its values. This method does not copy resource references, data bindings, or animations, although it does copy their current values. </summary>
    /// <returns>A modifiable deep copy of the current object. The <see cref="P:System.Windows.Freezable.IsFrozen" /> property of the cloned object is false even if the <see cref="P:System.Windows.Freezable.IsFrozen" /> property of the source is true.</returns>
    TRefCountedPtr<TransformGroup> CloneCurrentValue() { return (TransformGroup*) Transform::CloneCurrentValue().get_Ptr(); }

#pragma endregion Public Methods

#pragma region Public Properties

    /// <summary>Gets or sets the <see cref="T:System.Windows.Media.TransformCollection" /> that defines this <see cref="T:System.Windows.Media.TransformGroup" />. This is a dependency property. </summary>
    /// <returns>A collection of <see cref="T:System.Windows.Media.Transform" /> objects that define this <see cref="T:System.Windows.Media.TransformGroup" />. The default is an empty collection. </returns>
    TransformCollection* get_Children() { return m_pChildren; }
    void set_Children(TransformCollection* pChildren);
    IMPLEMENT_READONLY_REFERENCE_PROPERTY(Children, TransformCollection, true);

    /// <summary>Gets the <see cref="T:System.Windows.Media.Matrix" /> structure that describes the transformation represented by this <see cref="T:System.Windows.Media.TransformGroup" />. </summary>
    /// <returns>A composite of the <see cref="T:System.Windows.Media.Transform" /> objects in this <see cref="T:System.Windows.Media.TransformGroup" />.</returns>
    virtual Matrix get_Value();

#pragma endregion Public Properties

#pragma region Protected Methods

    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<TransformGroup>().get_Ptr(); }

#pragma endregion Protected Methods

#pragma region WPFG/Deviation

    virtual void CloneCore(Freezable* pSource) AVUI_OVERRIDE;

#pragma endregion WPFG/Deviation

#pragma region Internal Properties

    virtual bool get_IsIdentity() AVUI_OVERRIDE;

#pragma endregion Internal Properties

private:
    TRefCountedPtr<TransformCollection> m_pChildren;
};

typedef TRefCountedPtr<TransformGroup> TransformGroupPtr;


}; // namespace AVUI
